/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    background-image: url('static/backgound/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 30px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('static/backgound/banner.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: 0;
}

header > * {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.lol-logo {
    width: 150px;
    height: auto;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.lol-logo:hover {
    transform: scale(1.05);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 英雄头像网格样式 */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    justify-items: center;
}

.hero-avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #ef4444;
    background-color: #1e293b;
}

.hero-avatar:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    transition: filter 0.3s ease;
}

.hero-avatar:hover .hero-image {
    filter: brightness(1.2);
}

.hero-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 10px 5px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.hero-name-overlay h3 {
    font-size: 0.9rem;
    margin: 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #1e293b;
    padding: 0;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 40px 20px;
    min-height: 150px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 语音列表样式 */
#modalVoiceList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-item {
    padding: 12px 20px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.voice-item:last-child {
    border-bottom: none;
}

.voice-item:hover {
    background-color: #334155;
}

.voice-text {
    flex: 1;
    padding-right: 10px;
}

.play-button {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.play-button:hover {
    background-color: #b91c1c;
    transform: scale(1.1);
}

.play-button.playing {
    background-color: #10b981;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* 响应式网格布局 */
@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .hero-name-overlay h3 {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-list {
        grid-template-columns: 1fr;
    }
    
    .hero-header {
        padding: 12px 15px;
    }
    
    .hero-header h3 {
        font-size: 1.1rem;
    }
    
    .voice-item {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .voice-text {
        margin-bottom: 10px;
    }
    
    .play-button {
        align-self: flex-end;
    }
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.9rem;
}
